import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterModule } from '@angular/router';

import { BookSharedModule } from '../../shared';
import {
    PassageService,
    PassagePopupService,
    PassageComponent,
    PassageDetailComponent,
    PassageDialogComponent,
    PassagePopupComponent,
    PassageDeletePopupComponent,
    PassageDeleteDialogComponent,
    passageRoute,
    passagePopupRoute,
    PassageResolvePagingParams,
} from './';

const ENTITY_STATES = [
    ...passageRoute,
    ...passagePopupRoute,
];

@NgModule({
    imports: [
        BookSharedModule,
        RouterModule.forChild(ENTITY_STATES)
    ],
    declarations: [
        PassageComponent,
        PassageDetailComponent,
        PassageDialogComponent,
        PassageDeleteDialogComponent,
        PassagePopupComponent,
        PassageDeletePopupComponent,
    ],
    entryComponents: [
        PassageComponent,
        PassageDialogComponent,
        PassagePopupComponent,
        PassageDeleteDialogComponent,
        PassageDeletePopupComponent,
    ],
    providers: [
        PassageService,
        PassagePopupService,
        PassageResolvePagingParams,
    ],
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class BookPassageModule {}
